package com.itheima.demo;

import java.io.*;
import java.util.Scanner;

public class Demo05 {
    public static void main(String[] args) throws IOException {
        //字符输入缓冲流
        BufferedReader br = new BufferedReader(new FileReader("F:\\aaa.txt"));
        //字符输出缓冲流
        BufferedWriter bw = new BufferedWriter(new FileWriter("day12_IO\\c.txt"));

        //定义个变量记录每次读到的一行字符
        String line;
        while ((line = br.readLine())!=null){
        //readLine()：读取一行，没有字符就返回null

            //写出
            bw.write(line);
            //换行
            bw.newLine();
        }

        br.close();
        bw.close();

    }
}
